home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 24 / CU Amiga Magazine's Super CD-ROM 24 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-07].iso / CUCD / Programming / Asap / ASAP.readme < prev    next >
Encoding:
Text File  |  2006-10-09  |  4.4 KB  |  111 lines

  1. Short:    ASAP - Amiga Software Authoring Platform
  2. Uploader: hfx@fox.nstn.ca
  3. Author:   hfx@fox.nstn.ca
  4. Type:     dev/c
  5. Requires: Storm or SAS C++. GNUC++ support is being investigated
  6. Version:  1.0a beta (final beta)
  7. Replaces: dev/c/ASAP.lha
  8.  
  9. Update: April 26th '98:
  10.  
  11.         Miscellaneous tiny changes. Watch for the
  12.         companion version discussed under "updates" below.
  13.  
  14.         There is one trivial example, lines.c included.
  15.  
  16.         Note that I changed the file tree of the archive:
  17.  
  18.         ASAP/
  19.          ASAP (classes are in here)
  20.          LINES (trivial example)
  21.          CHANGES (old files)
  22.  
  23.         See Installation below
  24.  
  25. What: Zero overhead, inlined C++ wrapper classes for the Amiga API.
  26.       A collection of 90 header files, each having one class which derive
  27.       from the corresponding Amiga system structure, adding no data members,
  28.       only inlined methods which call the corresponding global prototype
  29.       substituting the 'this' pointer for the structure pointer.
  30.  
  31. Why: I'm a C++ programmer, and I think in terms of objects. The Amiga API
  32.      is a "flat" API. It helps me, and I hope many of you, to categorize these
  33.      functions into "classes" or "categories". Many of you may be concerned about
  34.      overhead using these. See below, there is absolutely *no* overhead. There are
  35.      several benefits, including fewer bugs, such as CloseWindow(pNotAWindow); Also,
  36.      if you want to work with a Window, or RastPort, for instance, you needn't worry
  37.      about what include's you need, just:
  38.        
  39.      #include <ASAP/Window.h>
  40.      #include <ASAP/RastPort.h>
  41.  
  42. How: A tool called ClassBuilder which I wrote for this purpose.
  43.  
  44. When: Part time work started in late January.
  45.  
  46. How it works: Firstly, there is no run time overhead when your compiler allows
  47.               inline optimization. In effect, these are a lot of #define's. As far
  48.               as storage is concerned, these classes *are* the Amiga structures.
  49.               You can treat these classes 100% as if they were the Amiga structures,
  50.               because ultimately, they are.
  51.  
  52.               Consider a structure, "Structure". There are some functions
  53.               which operate upon it, for example OpenStructure(Structure *) and
  54.               CloseStructure(Structure *). To simplify this for the beginner and
  55.               those who grow tired of typing, I write the following code:
  56.  
  57.               class AStructure : public Structure
  58.               {
  59.                public:
  60.                void Open() { ::OpenStructure(this); }
  61.                void Close() { ::CloseStructure(this); }
  62.               }; 
  63.  
  64.               Now the instance is tied to its methods, and there is less typing.
  65.               Also, I have overloaded operator new and delete where desirable.
  66.               Now you can create/destroy a window as follows:
  67.  
  68.               AWindow *pThis_Window = new(&The_NewWindow) AWindow;
  69.               delete pThis_Window;
  70.             
  71.               instead of:
  72.  
  73.               struct Window *pThis_Window = OpenWindow(&The_NewWindow); 
  74.               CloseWindow(pThis_Window);
  75.  
  76. Updates: These have all been compiled, but there might be one or two
  77.          logic errors (perhaps in the more obscure classes).
  78.  
  79.          Second version of the collection with abbreviated names for
  80.          those who do not mind aliases for the Amiga API functions.
  81.  
  82.          eg. pThis_Window->Zip(); // instead of pThis_Window->ZipWindow();
  83.  
  84.          Also, default parameters, where the OS defines special parameter
  85.          values or they are otherwise meaningful, must be added.
  86.  
  87. Future:  This collection is fairly comprehensive, but not complete. I'm relying
  88.          on you for feedback. Also, this is just phase I. I've got some nice code
  89.          built on top of this to allow simple, dynamic IDCMP/Boopsi event handling
  90.          (dispatching) which I hope to release some time this summer.
  91.  
  92. Installation:
  93.  
  94.     Decompress the archive wherever you wish.
  95.  
  96.     SAS/C: Move the ASAP classes directory into your
  97.            cxxinclude directory (sc:cxxinclude)
  98.  
  99.     Storm C: Put the ASAP class directory wherever you want,
  100.                  only make certain the directory is in your
  101.                  include path.
  102.  
  103.     The files should be reachable as follows:
  104.     
  105.     #include <ASAP/HeaderName.h>
  106.  
  107. Important:
  108.  
  109. Please, please email me if you have any problems or suggestions/complaints.
  110. I want to hear from you! :)
  111.